import React from 'react';
import DatePicker from 'react-datepicker';
import 'react-datepicker/dist/react-datepicker.css';

export default function CalendarPicker({ selectedDate, onDateChange }) {
  return (
    <div>
      <label style={{ marginRight: '10px' }}>选择日期：</label>
      <DatePicker
        selected={selectedDate}
        onChange={onDateChange}
        showTimeSelect
        dateFormat="yyyy-MM-dd HH:mm:ss"
        timeIntervals={15}
        placeholderText="点击选择日期"
      />
    </div>
  );
}